mod common;

use common::dourl;
use serde_json::json;

#[tokio::test]
#[ignore]
async fn a_p() {
    let data = json!({
        "line": "line-one",
        "wsn": "op010",
        "start": "2020-07-20T10:05Z",
        "end": "2020-08-20T10:05Z",
        "sub": 15,
    });
    let ret = dourl(&data, "p").await.unwrap();
    dbg!(&ret);
}

#[tokio::test]
#[ignore]
async fn b_np() {
    let data = json!({
        "line": "line-one",
        "wsn": "op010",
        "start": "2020-07-20T10:05Z",
        "end": "2020-08-20T10:05Z",
        "sub": 15,
    });
    let ret = dourl(&data, "np").await.unwrap();
    dbg!(&ret);
}

#[tokio::test]
#[ignore]
async fn b_c() {
    let data = json!({
        "line": "line-one",
        "wsn": "op010",
        "start": "2020-07-20T10:05Z",
        "end": "2020-08-20T10:05Z",
        "sub": 15,
    });
    let ret = dourl(&data, "c").await.unwrap();
    dbg!(&ret);
}

#[tokio::test]
#[ignore]
async fn b_u() {
    let data = json!({
        "line": "line-one",
        "wsn": "op010",
        "start": "2020-07-20T10:05Z",
        "end": "2020-08-20T10:05Z",
        "sub": 15,
    });
    let ret = dourl(&data, "u").await.unwrap();
    dbg!(&ret);
}

#[tokio::test]
async fn b_xbar() {
    let data = json!({
        "line": "line-one",
        "tab": "cpk",
        "wsn": "M010",
        "obj": "x",
        "row": 10,
        "one": true,
        "two": true,
        "start": "2022-05-29T10:05Z",
        "end": "2022-05-31T10:05Z",
    });
    let ret = dourl(&data, "xbar").await.unwrap();
    dbg!(&ret);
}
